package kassiopeia.plugin.test;

import kassiopeia.commons.model.plugin.PluginDescriptor;
import kassiopeia.commons.model.xml.PluginDescriptorXmlSerializer;
import kassiopeia.commons.util.IOUtils;
import kassiopeia.plugin.Plugin;
import static org.fest.assertions.Assertions.assertThat;

public abstract class DescriptorIntegrationTestSupport {

    protected void performIntegrationTest() {
        // given
        String descriptorXml = IOUtils.getFileContent(Plugin.PLUGIN_DESCRIPTOR_PATH);

        // when
        PluginDescriptor descriptor = PluginDescriptorXmlSerializer.fromXml(descriptorXml);

        // then
        assertThat(descriptor).isNotNull();
    }

}
